/* 分贝测试器专用样式 */

header {
    padding: 1rem 0;
}

header h1 {
    font-size: 1.3rem;
    margin: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.back-btn {
    position: absolute;
    left: 2rem;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.back-btn:hover {
    transform: translateX(-5px);
}

.sound-meter-container {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.meter-display {
    text-align: center;
    margin-bottom: 2rem;
}

.decibel-value {
    font-size: 6rem;
    font-weight: bold;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.decibel-unit {
    font-size: 2rem;
    color: #7f8c8d;
    margin-left: 0.5rem;
}

.meter-scale {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.scale-item {
    color: #7f8c8d;
    font-weight: 500;
}

.scale-item.safe {
    color: #4caf50;
}

.scale-item.moderate {
    color: #ff9800;
}

.scale-item.loud {
    color: #f44336;
}

.scale-item.dangerous {
    color: #9c27b0;
}

.meter-bar-container {
    margin-bottom: 2rem;
}

.meter-bar {
    height: 30px;
    background-color: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #ff9800 50%, #f44336 100%);
    width: 0;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 15px;
}

/* 波形可视化样式 */
.waveform-container {
    margin: 2rem 0;
    height: 100px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.waveform {
    width: 100%;
    height: 100%;
}

/* 声音强度指示器样式 */
.intensity-indicator {
    text-align: center;
    margin-bottom: 1.5rem;
}

.intensity-value {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background-color: #ecf0f1;
    color: #2c3e50;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 100px;
}

.intensity-value.quiet {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.intensity-value.moderate {
    background-color: #fff3e0;
    color: #e65100;
}

.intensity-value.loud {
    background-color: #ffebee;
    color: #c62828;
}

.intensity-value.dangerous {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

.btn-secondary:hover {
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.info-section {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.info-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.noise-reference {
    list-style: none;
    padding: 0;
}

.noise-reference li {
    margin-bottom: 0.5rem;
    color: #5a6c7d;
}

.noise-reference span {
    font-weight: 600;
    color: #2c3e50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .back-btn {
        left: 1rem;
    }
    
    .sound-meter-container {
        margin: 2rem auto;
        padding: 1.5rem;
    }
    
    .decibel-value {
        font-size: 4rem;
    }
    
    .controls {
        flex-direction: column;
    }
}